﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace T.Personnel.Repository
{
    public interface IRepository<T> where T : class
    {
        Task<int> AddAsync(T entity);
        Task<int> DelAsync(int id);
        Task<int> DelAsync(Expression<Func<T, bool>> predicate);
        Task<int> UpdAsync(T entity);
        Task<T> GetAsync(int id);
        Task<T> GetAsync(Expression<Func<T, bool>> predicate);
        Task<IQueryable<T>> GetListAsync(Expression<Func<T, bool>> predicate);
        Task<int> AddsAsync(T t);
    }
}
